summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-10doc/api.pod: Specify encodingHEADmasterYorhel1-0/+2
2016-07-10globsterctl: Fix perl warning about precedenceYorhel1-1/+1
2013-10-12hub/users: Fix type of user field in UserChanged and UserJoined signalsYorhel1-1/+1
2013-09-29hub/adc: Fix misreporting of slot count as hub-op countYorhel1-1/+1
Looks like a copy-paste error.
2013-06-09hub/adc: Make sure that the uid of the connecting user is 0Yorhel1-1/+1
Bug reported by MiMic.
2013-05-16hub/nmdc: Add a few more is-user-really-online checksYorhel1-4/+7
hub_users_get() may return something for offline users, so is, on its own, not suitable for checking whether a user is online or not. (This has always been the case, these bugs were present before a27137d)
2013-05-16hub/nmdc: Don't update info of offline usersYorhel1-2/+2
Fixes a bug introduced in previous commit.
2013-05-16hub/{adc,nmdc,users}: Moved proto-specific user list management logicYorhel8-301/+365
This is a partial rewrite of the user list management code. Some protocol-specific logic has been moved out of hub/users and into hub/{adc,nmdc}, in order to simplify the logic in hub/users. In particular: * User ID generation is performed in hub/{adc/nmdc} * The SID to user lookup table has been moved to hub/adc * The deferred-user-online logic has been moved to hub/nmdc. This means that new users are not added to the list in hub/users until they can be considered as "online" These changes fix a number of bugs: * hub/adc previously assumed that, if the user ID was known, the user is also online. This assumption didn't hold for uid=0, which resulted in the users' SID and CID not getting updated on reconnect, breaking the SID -> user lookup and causing a possible assertion failure (followed by a crash) in hub/users on disconnect. * Once a user leaves the hub, its struct object is not re-used later on when the user reconnects. This did happen before, and could cause information from the previous user to be re-added to the new user, even if that information doesn't apply to the new user. hub/users had no way of guarding against this bug because it had no way of telling whether the user had been online before or not, due to the NMDC deferred-info logic being merged into hub/users. Since this is a fairly major change, this commit is likely to introduce a few bugs on its own. Some more testing should reveal that, hopefully.
2013-05-01hub/adc: Fix possible double-free of last INF valuesYorhel2-2/+7
2013-04-28util/netutil: User proper C99 flexible array memberYorhel1-1/+1
Actually specifying an array length invokes undefined behaviour. (Not that I know of any compiler which uses array lengths within structs for anything other than determining the size of the struct, but let's just follow the spec.)
2013-04-28deps: Removed ecbuf, it's not used anymoreYorhel3-2/+0
2013-04-28hub/manager: No need to do a search to insert something at the endYorhel2-7/+20
2013-04-28util/{list,logfile}: Abstract list handling from logfile.c to list.hYorhel2-14/+18
2013-04-28hub/chat: Use linked list for the chat log instead of ecbufYorhel3-44/+62
Using ecbuf for a list of pointers isn't in any way more efficient than just using a linked list. This switch also avoids the ugly me flag embedded in the allocated message. The message is now just stored as a flexible array member to make each log entry a single memory allocation.
2013-04-28util/list: Added (preliminary) linked list abstractionYorhel2-0/+83
2013-04-27test/vec: Fix some warnings about uninitialized values with clangYorhel1-1/+3
Too bad clang can't verify the correctness of my vector macros at compile-time, then it would have seen that the value was never used uninitialized. But since the point of the test suite is to test the macros, and the macros may be doing something wrong and the value may indeed end up staying uninitialized... the warning definitely pointed to a bug.
2013-04-27hub/manager: Use new vector macros for the list of hubsYorhel2-59/+23
2013-04-27util/vec: Added vector macros + test suiteYorhel3-2/+287
The current macros are specially designed for ordered arrays, but it'd be easy to add some macros for unordered arrays, too. Support for sparse arrays (like klib/kvec) isn't on my agenda. I'm no doubt going to need this abstraction for various things in the future (especially share and download queue management), but this current implementation is designed to replace the ugly array in hub/manager.c with something more elegant (and potentially faster, but it likely won't matter).
2013-04-15main: Fork to the background by default, add --no-daemon optionYorhel5-6/+81
2013-04-15main: Log to ~/.globster/logs/main.log by defaultYorhel4-9/+18
2013-04-14Makefile: Remove kvec.h remnantYorhel1-2/+1
I really must have been sleeping.
2013-04-14main.c: Mention -l flag in -hYorhel1-1/+1
2013-04-14main.c: Add --log-file=syslog functionalityYorhel2-14/+26
2013-04-14doc/globster: Fix location of the -l flagYorhel1-2/+2
2013-04-14main.c: Re-open log file on SIGHUPYorhel1-1/+9
2013-04-14Add util/logfile abstraction and -l, --log-file optionYorhel6-2/+223
2013-04-14main: Added -h,--help option to globster(1)Yorhel2-0/+20
2013-04-14hub: Get rid of pointer indirection for hub_adc and hub_nmdc structsYorhel8-14/+10
The indirection is neither more clear/simple nor any more efficient.
2013-04-14Added const flag to some more static structsYorhel8-11/+11
2013-04-13hub/connection: Remove old TODO commentYorhel1-1/+0
2013-04-13hub/{hub,manager}: Group some PropertiesChanged signalsYorhel2-7/+12
2013-04-13hub/connection: Fix disconnect code when hub errormessage is emptyYorhel1-2/+2
2013-04-13hub/users: Use new dbo API to group PropertiesChanged signalsYorhel1-56/+25
This allows me to finally get rid of the ugly _emitcounts() function.
2013-04-13dbo+itfgen: Allow for grouping multiple PropertiesChanged signalsYorhel3-31/+47
2013-04-13globster-launch: Pass unrecognized options to globster + unblock I/OYorhel2-16/+16
This doesn't require keeping this script in sync when new options are added to globster. Setting O_NONBLOCK flag may fix some buffering issues with the log redirection.
2013-04-13dbo: Make the list of exported interfaces for an object staticYorhel15-85/+103
I'm not quite convinced yet that this actually simplifies things. It does make object creation a *tiny* bit more efficient. This also changes the type of the dbo_<name>_interface variables, because the pointer indirection didn't allow for using the pointer to the interface struct as a compile-time constant.
2013-04-13util/{adc,base32}: Make the base32 alphabet string a constYorhel2-2/+2
2013-04-13dbo+itfgen: Declare the interface structs as constYorhel3-27/+27
They *are* constants, after all. Gcc now properly puts the structs into the .rodata sections rather than .data. I have absolutely no idea if that has any effect on memory usage or loading time, but it sure sounds more efficient. :-)
2013-04-13doc/api: Fix statement about hubs not being rememberedYorhel1-2/+2
2013-04-10configure: Check whether -lrt is needed for clock_gettime()Yorhel1-0/+1
Required for glibc < 2.17.
2013-04-10deps: Updated sqlasync + freetigerYorhel1-0/+0
Both fixing a compilation bug.
2013-04-10hub/manager: Delete hub info from database when hub is deletedYorhel1-0/+3
Otherwise a deleted hub will come back on a restart.
2013-04-10hub: Delete hub variables when resetYorhel3-9/+16
Storing empty variables in the database is ugly.
2013-04-09doc/api: Fix description of the ReconnectTimeout propertyYorhel1-4/+4
2013-04-09hub: Added 'AutoConnect' property and -n option to globster(1)Yorhel9-16/+57
2013-04-09hub/connection: Allow Connect() with an empty addr to re-use stored addrYorhel4-6/+16
No need to give a full address to Connect() every time.
2013-04-09hub: Save (almost) all hub config to the databaseYorhel6-14/+38
Yay, Globster now properly remembers hub config across restarts. Now it's finally safe to hardcode user IDs in scripts, too.
2013-04-09db.c: Use NONE column type for 'value' columnsYorhel1-2/+2
This way I get an integer back when I store an integer. (I should be increasing the user_version with this and add the required queries for updating. But that's kinda overkill as at this point. Especially regarding the hub_vars table, I haven't even pushed that commit yet.)
2013-04-08db: Add hub_vars table + hub: Load hub list and info from the DBYorhel9-24/+99
Currently fairly useless, since no hub information is ever *saved* to the database. I'll get to that tomorrow.
2013-04-08hub/manager: List the hubs in a set-like vectorYorhel1-36/+63
This has the advantage that the hub id does no longer relate to how things are organized in-memory. Which, in turn, allows the id to be fairly large and/or more dynamic without affecting performance. Since the hub list is now efficiently packed regardless of id gaps, this should improve iteration performance a bit. And that's the operation that matters most, since it's what hub_manager_infchange() does.