--- kannel-snapshot/gw/smsc/smsc_smpp.c	2010-09-19 23:00:05.000000000 -0500
+++ kannel-snapshot-roy/gw/smsc/smsc_smpp.c	2010-09-20 17:36:26.000000000 -0500
@@ -1654,7 +1654,8 @@ static int handle_pdu(SMPP *smpp, Connec
                 smpp->conn->status = SMSCCONN_DISCONNECTED;
                 mutex_unlock(smpp->conn->flow_mutex);
                 if (pdu->u.bind_transmitter_resp.command_status == SMPP_ESME_RINVSYSID ||
-                    pdu->u.bind_transmitter_resp.command_status == SMPP_ESME_RINVPASWD) {
+                    pdu->u.bind_transmitter_resp.command_status == SMPP_ESME_RINVPASWD ||
+                    pdu->u.bind_transmitter_resp.command_status == SMPP_ESME_RINVSYSTYP) {
                     smpp->quitting = 1;
                 }
             } else {
@@ -1678,7 +1679,8 @@ static int handle_pdu(SMPP *smpp, Connec
                  smpp->conn->status = SMSCCONN_DISCONNECTED;
                  mutex_unlock(smpp->conn->flow_mutex);
                  if (pdu->u.bind_transceiver_resp.command_status == SMPP_ESME_RINVSYSID ||
-                     pdu->u.bind_transceiver_resp.command_status == SMPP_ESME_RINVPASWD) {
+                     pdu->u.bind_transceiver_resp.command_status == SMPP_ESME_RINVPASWD ||
+                     pdu->u.bind_transceiver_resp.command_status == SMPP_ESME_RINVSYSTYP) {
                      smpp->quitting = 1;
                  }
             } else {
@@ -1702,11 +1704,12 @@ static int handle_pdu(SMPP *smpp, Connec
                  smpp->conn->status = SMSCCONN_DISCONNECTED;
                  mutex_unlock(smpp->conn->flow_mutex);
                  if (pdu->u.bind_receiver_resp.command_status == SMPP_ESME_RINVSYSID ||
-                     pdu->u.bind_receiver_resp.command_status == SMPP_ESME_RINVPASWD) {
+                     pdu->u.bind_receiver_resp.command_status == SMPP_ESME_RINVPASWD ||
+                     pdu->u.bind_receiver_resp.command_status == SMPP_ESME_RINVSYSTYP) {
                      smpp->quitting = 1;
                  }
             } else {
-                /* set only resceive status if no transmitt is bind */
+                /* set only receive status if no transmitt is bind */
                 mutex_lock(smpp->conn->flow_mutex);
                 if (smpp->conn->status != SMSCCONN_ACTIVE) {
                     smpp->conn->status = SMSCCONN_ACTIVE_RECV;
