git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/x86 - Oops, bad entry
[tpg/acess2.git]
/
Modules
/
IPStack
/
interface.c
diff --git
a/Modules/IPStack/interface.c
b/Modules/IPStack/interface.c
index
14c3ed3
..
82d1b8c
100644
(file)
--- a/
Modules/IPStack/interface.c
+++ b/
Modules/IPStack/interface.c
@@
-6,8
+6,8
@@
#define VERSION VER2(0,10)
#include "ipstack.h"
#include "link.h"
#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
// === CONSTANTS ===
//! Default timeout value, 30 seconds
@@
-181,6
+181,7
@@
int IPStack_Root_IOCtl(tVFS_Node *Node, int ID, void *Data)
{
char name[4] = "";
tInterface *iface = IPStack_AddInterface(Data, name);
{
char name[4] = "";
tInterface *iface = IPStack_AddInterface(Data, name);
+ if(iface == NULL) LEAVE_RET('i', -1);
tmp = iface->Node.ImplInt;
}
LEAVE_RET('i', tmp);
tmp = iface->Node.ImplInt;
}
LEAVE_RET('i', tmp);
@@
-203,6
+204,7
@@
tInterface *IPStack_AddInterface(const char *Device, const char *Name)
card = IPStack_GetAdapter(Device);
if( !card ) {
card = IPStack_GetAdapter(Device);
if( !card ) {
+ Log_Debug("IPStack", "Unable to open card '%s'", Device);
LEAVE('n');
return NULL; // ERR_YOURBAD
}
LEAVE('n');
return NULL; // ERR_YOURBAD
}
@@
-249,7
+251,7
@@
tInterface *IPStack_AddInterface(const char *Device, const char *Name)
// Delay setting ImplInt until after the adapter is opened
// Keeps things simple
iface->Node.ImplInt = giIP_NextIfaceId++;
// 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 );
// Append to list
SHORTLOCK( &glIP_Interfaces );
UCC
git Repository :: git.ucc.asn.au