summaryrefslogtreecommitdiff
path: root/src/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/send.c b/src/send.c
index e16856598..4209e2a1b 100644
--- a/src/send.c
+++ b/src/send.c
@@ -32,6 +32,15 @@ void send_cmd(const char *source, const char *fmt, ...)
vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ if (!UplinkSock)
+ {
+ if (source)
+ Alog(LOG_DEBUG) << "Attemtped to send \"" << source << " " << buf << "\" with UplinkSock NULL";
+ else
+ Alog(LOG_DEBUG) << "Attemtped to send \"" << buf << "\" with UplinkSock NULL";
+ return;
+ }
+
if (source)
{
UplinkSock->Write(":%s %s", source, buf);
@@ -59,6 +68,15 @@ void send_cmd(const std::string &source, const char *fmt, ...)
vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ if (!UplinkSock)
+ {
+ if (!source.empty())
+ Alog(LOG_DEBUG) << "Attemtped to send \"" << source << " " << buf << "\" with UplinkSock NULL";
+ else
+ Alog(LOG_DEBUG) << "Attemtped to send " << buf << "\" with UplinkSock NULL";
+ return;
+ }
+
if (!source.empty())
{
UplinkSock->Write(":%s %s", source.c_str(), buf);