|
|
@ -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
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -68,21 +69,18 @@ scp_process_start(void* sck)
|
|
|
|
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,
|
|
|
|
|
|
|
|
"unknown protocol version specified. connection refused.");
|
|
|
|
break;
|
|
|
|
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.");
|
|
|
@ -90,10 +88,8 @@ scp_process_start(void* sck)
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|