ulab-original
jsorg71 18 years ago
parent c0f0fec1d6
commit 2183c539cc

@ -22,7 +22,8 @@
* @file scp.c * @file scp.c
* @brief scp (sesman control protocol) common code * @brief scp (sesman control protocol) common code
* scp (sesman control protocol) common code * scp (sesman control protocol) common code
* This code controls which version is being used and starts the appropriate process * This code controls which version is being used and starts the
* appropriate process
* @author Jay Sorg, Simone Fedele * @author Jay Sorg, Simone Fedele
* *
*/ */
@ -64,36 +65,31 @@ scp_process_start(void* sck)
else else
{ {
LOG_DBG("accept ok, go on with scp v1\n",0); LOG_DBG("accept ok, go on with scp v1\n",0);
LOG_DBG("user: %s\npass: %s",sdata->username, sdata->password); LOG_DBG("user: %s\npass: %s",sdata->username, sdata->password);
scp_v1_process(&scon, sdata); scp_v1_process(&scon, sdata);
} }
break; break;
case SCP_SERVER_STATE_VERSION_ERR: case SCP_SERVER_STATE_VERSION_ERR:
/* an unknown scp version was requested, so we shut down the */ /* an unknown scp version was requested, so we shut down the */
/* connection (and log the fact) */ /* connection (and log the fact) */
log_message(LOG_LEVEL_WARNING,"unknown protocol version specified. connection refused."); log_message(LOG_LEVEL_WARNING,
break; "unknown protocol version specified. connection refused.");
break;
case SCP_SERVER_STATE_NETWORK_ERR: case SCP_SERVER_STATE_NETWORK_ERR:
log_message(LOG_LEVEL_WARNING,"libscp network error."); log_message(LOG_LEVEL_WARNING, "libscp network error.");
break; break;
case SCP_SERVER_STATE_SEQUENCE_ERR: case SCP_SERVER_STATE_SEQUENCE_ERR:
log_message(LOG_LEVEL_WARNING,"libscp sequence error."); log_message(LOG_LEVEL_WARNING, "libscp sequence error.");
break; break;
case SCP_SERVER_STATE_INTERNAL_ERR: case SCP_SERVER_STATE_INTERNAL_ERR:
/* internal error occurred (eg. malloc() error, ecc.) */ /* internal error occurred (eg. malloc() error, ecc.) */
log_message(LOG_LEVEL_ERROR, "libscp internal error occurred."); log_message(LOG_LEVEL_ERROR, "libscp internal error occurred.");
break; break;
default: default:
log_message(LOG_LEVEL_ALWAYS, "unknown return from scp_vXs_accept()"); log_message(LOG_LEVEL_ALWAYS, "unknown return from scp_vXs_accept()");
} }
g_tcp_close(scon.in_sck); g_tcp_close(scon.in_sck);
free_stream(scon.in_s); free_stream(scon.in_s);
free_stream(scon.out_s); free_stream(scon.out_s);
return 0; return 0;
} }

Loading…
Cancel
Save