Server 0.0.1
HTTP/REST server implementation

src/session/delete.c

Go to the documentation of this file.
00001 
00023 #include <search.h>
00024 
00025 #include "session.h"
00026 #include "class.h"
00027 
00028 
00029 static
00030 inline
00031 int
00032 sessionDeleteComp(const void * _a, const void * _b)
00033 {
00034         unsigned long a = *(unsigned long *)_a;
00035         Session       b = (Session)_b;
00036         return (a < b->id)? -1 : (a > b->id)? 1 : 0;
00037 }
00038 
00039 void
00040 sessionDelete(const Session * root, const unsigned long id)
00041 {
00042         tdelete(&id, (void**)root, sessionDeleteComp);
00043 }
00044 
00045 // vim: set ts=4 sw=4:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines