gsup client: move not-connected to error loglevel

Change-Id: I8290963aedb7237da89c9ff98adf4cd33beb5031
This commit is contained in:
Neels Hofmeyr 2017-07-27 14:06:21 +02:00 committed by Harald Welte
parent 979cd26f35
commit bc5dd4927e
1 changed files with 2 additions and 10 deletions

View File

@ -330,20 +330,12 @@ void gsup_client_destroy(struct gsup_client *gsupc)
int gsup_client_send(struct gsup_client *gsupc, struct msgb *msg) int gsup_client_send(struct gsup_client *gsupc, struct msgb *msg)
{ {
if (!gsupc) { if (!gsupc || !gsupc->is_connected) {
LOGP(DGPRS, LOGL_NOTICE, "No GSUP client, unable to " LOGP(DGPRS, LOGL_ERROR, "GSUP not connected, unable to send %s\n", msgb_hexdump(msg));
"send %s\n", msgb_hexdump(msg));
msgb_free(msg); msgb_free(msg);
return -ENOTCONN; return -ENOTCONN;
} }
if (!gsupc->is_connected) {
LOGP(DGPRS, LOGL_NOTICE, "GSUP not connected, unable to "
"send %s\n", msgb_hexdump(msg));
msgb_free(msg);
return -EAGAIN;
}
client_send(gsupc, IPAC_PROTO_EXT_GSUP, msg); client_send(gsupc, IPAC_PROTO_EXT_GSUP, msg);
return 0; return 0;