#define VERSION VER2(0,10)
#include "ipstack.h"
#include "link.h"
-#include <tpl_drv_common.h>
-#include <tpl_drv_network.h>
+#include <api_drv_common.h>
+#include <api_drv_network.h>
// === CONSTANTS ===
//! Default timeout value, 30 seconds
{
char name[4] = "";
tInterface *iface = IPStack_AddInterface(Data, name);
+ if(iface == NULL) LEAVE_RET('i', -1);
tmp = iface->Node.ImplInt;
}
LEAVE_RET('i', tmp);
card = IPStack_GetAdapter(Device);
if( !card ) {
+ Log_Debug("IPStack", "Unable to open card '%s'", Device);
LEAVE('n');
return NULL; // ERR_YOURBAD
}
// Delay setting ImplInt until after the adapter is opened
// Keeps things simple
iface->Node.ImplInt = giIP_NextIfaceId++;
- sprintf(iface->Name, "%i", iface->Node.ImplInt);
+ sprintf(iface->Name, "%i", (int)iface->Node.ImplInt);
// Append to list
SHORTLOCK( &glIP_Interfaces );