Skip to content

Commit

Permalink
Nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
buttonfly1000 committed Jan 17, 2017
1 parent dda4378 commit dd41da3
Show file tree
Hide file tree
Showing 83 changed files with 26 additions and 6 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified AUTHORS
100644 → 100755
Empty file.
Empty file modified COPYING
100644 → 100755
Empty file.
Empty file modified ChangeLog
100644 → 100755
Empty file.
Empty file modified INSTALL
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified NEWS
100644 → 100755
Empty file.
Empty file modified README
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified StatisticTemplate.html
100644 → 100755
Empty file.
Empty file modified aclocal.m4
100644 → 100755
Empty file.
Empty file modified addresslist.c
100644 → 100755
Empty file.
Empty file modified addresslist.h
100644 → 100755
Empty file.
Empty file modified array.h
100644 → 100755
Empty file.
Empty file modified cacheht.c
100644 → 100755
Empty file.
Empty file modified cacheht.h
100644 → 100755
Empty file.
Empty file modified cachettlcrtl.h
100644 → 100755
Empty file.
Empty file modified checkip.c
100644 → 100755
Empty file.
Empty file modified checkip.h
100644 → 100755
Empty file.
Empty file modified codeblocks/dnsforwarder.cbp
100644 → 100755
Empty file.
Empty file modified compile
100644 → 100755
Empty file.
Empty file modified config.h.in
100644 → 100755
Empty file.
Empty file modified configure
100644 → 100755
Empty file.
Empty file modified configure.ac
100644 → 100755
Empty file.
Empty file modified default.config
100644 → 100755
Empty file.
Empty file modified depcomp
100644 → 100755
Empty file.
Empty file modified dnsparser.c
100644 → 100755
Empty file.
Empty file modified dnsparser.h
100644 → 100755
Empty file.
Empty file modified dnsrelated.c
100644 → 100755
Empty file.
Empty file modified dnsrelated.h
100644 → 100755
Empty file.
Empty file modified domainstatistic.h
100644 → 100755
Empty file.
Empty file modified downloader.c
100644 → 100755
Empty file.
Empty file modified downloader.h
100644 → 100755
Empty file.
Empty file modified filter.h
100644 → 100755
Empty file.
Empty file modified goodiplist.h
100644 → 100755
Empty file.
Empty file modified install-sh
100644 → 100755
Empty file.
Empty file modified ipmisc.c
100644 → 100755
Empty file.
Empty file modified ipmisc.h
100644 → 100755
Empty file.
Empty file modified linkedqueue.h
100644 → 100755
Empty file.
Empty file modified mac_bin/dnsforwarder
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ int main(int argc, char *argv[])
return -311;
}

putchar('\n');
putchar('\n');

ExitThisThread();

#ifdef WIN32
WSACleanup();
Expand Down
Empty file modified makefile.am
100644 → 100755
Empty file.
Empty file modified makefile.in
100644 → 100755
Empty file.
Empty file modified missing
100644 → 100755
Empty file.
Empty file modified pipes.c
100644 → 100755
Empty file.
Empty file modified pipes.h
100644 → 100755
Empty file.
Empty file modified querydnslistentcp.h
100644 → 100755
Empty file.
Empty file modified readline.c
100644 → 100755
Empty file.
Empty file modified readline.h
100644 → 100755
Empty file.
Empty file modified request_response.c
100644 → 100755
Empty file.
Empty file modified rwlock.h
100644 → 100755
Empty file.
Empty file modified simpleht.c
100644 → 100755
Empty file.
Empty file modified simpleht.h
100644 → 100755
Empty file.
17 changes: 12 additions & 5 deletions socketpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static int SocketPool_Add(SocketPool *sp,
su.Data = NULL;
}

if( sp->t.Add(&(sp->t), &su) != NULL )
if( sp->t.Add(&(sp->t), &su) == NULL )
{
return -27;
}
Expand All @@ -32,15 +32,22 @@ typedef struct _SocketPool_Fetch_Arg
{
SOCKET Sock;
fd_set *fs;
void **DataOut;
} SocketPool_Fetch_Arg;

static int SocketPool_Fetch_Inner(Bst *t,
const SocketUnit *Data,
const SocketUnit *su,
SocketPool_Fetch_Arg *Arg)
{
if( FD_ISSET(Data->Sock, Arg->fs) )
if( FD_ISSET(su->Sock, Arg->fs) )
{
Arg->Sock = Data->Sock;
Arg->Sock = su->Sock;

if( Arg->DataOut != NULL )
{
*(Arg->DataOut) = su->Data;
}

return 1;
}

Expand All @@ -52,7 +59,7 @@ static SOCKET SocketPool_FetchOnSet(SocketPool *sp,
void **Data
)
{
SocketPool_Fetch_Arg ret = {INVALID_SOCKET, fs};
SocketPool_Fetch_Arg ret = {INVALID_SOCKET, fs, Data};

sp->t.Enum(&(sp->t),
(Bst_Enum_Callback)SocketPool_Fetch_Inner,
Expand Down
Empty file modified sockets.c
100644 → 100755
Empty file.
Empty file modified sockets.h
100644 → 100755
Empty file.
Empty file modified test/linkedqueue/linkedqueue.cbp
100644 → 100755
Empty file.
Empty file modified test/linkedqueue/main.c
100644 → 100755
Empty file.
Empty file modified test/pipes/main.c
100644 → 100755
Empty file.
Empty file modified test/pipes/pipe.cbp
100644 → 100755
Empty file.
Empty file modified test/stablebuffer/main.c
100644 → 100755
Empty file.
Empty file modified test/stablebuffer/test.cbp
100644 → 100755
Empty file.
Empty file modified test/stringchunk/main.c
100644 → 100755
Empty file.
Empty file modified test/stringchunk/stringchunk.cbp
100644 → 100755
Empty file.
Empty file modified test/stringlist/main.c
100644 → 100755
Empty file.
Empty file modified test/stringlist/stringlist.cbp
100644 → 100755
Empty file.
Empty file modified test/testutils.c
100644 → 100755
Empty file.
Empty file modified test/testutils.h
100644 → 100755
Empty file.
Empty file modified test/timedtask/main.c
100644 → 100755
Empty file.
Empty file modified test/timedtask/timedtask.cbp
100644 → 100755
Empty file.
Empty file modified test/utils/main.c
100644 → 100755
Empty file.
Empty file modified test/utils/utils.cbp
100644 → 100755
Empty file.
Empty file modified test/winmsgque/main.c
100644 → 100755
Empty file.
Empty file modified test/winmsgque/winmsgque.cbp
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,3 +1106,12 @@ int SetSocketNonBlock(SOCKET sock, BOOL NonBlocked)
return 0;
#endif
}

void ExitThisThread(void)
{
#ifdef WIN32
ExitThread(0);
#else /* WIN32 */
pthread_exit(NULL);
#endif /* WIN32 */
}
2 changes: 2 additions & 0 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,7 @@ char *ReplaceStr_WithLengthChecking(char *Src,
);

int SetSocketNonBlock(SOCKET sock, BOOL NonBlocked);

void ExitThisThread(void);

#endif /* _UTILS_ */
Empty file modified vc/dnsforwarder.sln
100644 → 100755
Empty file.
Empty file modified vc/dnsforwarder.v11.suo
100644 → 100755
Empty file.
Empty file modified vc/dnsforwarder.vcxproj
100644 → 100755
Empty file.
Empty file modified vc/dnsforwarder.vcxproj.filters
100644 → 100755
Empty file.
Empty file modified vc/dnsforwarder.vcxproj.user
100644 → 100755
Empty file.
Empty file modified winmsgque.c
100644 → 100755
Empty file.
Empty file modified winmsgque.h
100644 → 100755
Empty file.

0 comments on commit dd41da3

Please sign in to comment.