tpg/opendispense2.git
13 years agoError check in Coke_int_UpdateSlotStatuses
John Hodge [Sun, 20 Feb 2011 08:35:37 +0000 (16:35 +0800)]
Error check in Coke_int_UpdateSlotStatuses

13 years agoMerge branch 'master' of serenade.mutabah.net:opendispense2
John Hodge [Sun, 20 Feb 2011 08:25:26 +0000 (16:25 +0800)]
Merge branch 'master' of serenade.mutabah.net:opendispense2

Conflicts:
src/server/handler_coke.c

13 years agoMisc
John Hodge [Sun, 20 Feb 2011 08:23:19 +0000 (16:23 +0800)]
Misc

13 years agoFixed timeout for coke handler
John Hodge [Sun, 20 Feb 2011 08:22:07 +0000 (16:22 +0800)]
Fixed timeout for coke handler

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 07:58:04 +0000 (15:58 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoRandom commit
John Hodge [Sun, 20 Feb 2011 07:57:22 +0000 (15:57 +0800)]
Random commit

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 07:19:55 +0000 (15:19 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoRemoved debug message
John Hodge [Sun, 20 Feb 2011 07:19:34 +0000 (15:19 +0800)]
Removed debug message

13 years agoCleaning up a little
John Hodge [Sun, 20 Feb 2011 07:19:13 +0000 (15:19 +0800)]
Cleaning up a little

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 07:13:13 +0000 (15:13 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoAdded periodic thread (reloads item config, checks coke slots)
John Hodge [Sun, 20 Feb 2011 07:12:38 +0000 (15:12 +0800)]
Added periodic thread (reloads item config, checks coke slots)

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 05:52:10 +0000 (13:52 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoItem statuses
John Hodge [Sun, 20 Feb 2011 05:51:49 +0000 (13:51 +0800)]
Item statuses

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 04:58:07 +0000 (12:58 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoRemoved server side spacers, made client do the work
John Hodge [Sun, 20 Feb 2011 04:57:16 +0000 (12:57 +0800)]
Removed server side spacers, made client do the work

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 04:02:54 +0000 (12:02 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoAdding support for spacers
John Hodge [Sun, 20 Feb 2011 04:01:17 +0000 (12:01 +0800)]
Adding support for spacers

13 years agoAdded user and balance view to the ncurses gui
John Hodge [Sun, 20 Feb 2011 03:22:57 +0000 (11:22 +0800)]
Added user and balance view to the ncurses gui

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sun, 20 Feb 2011 01:46:42 +0000 (09:46 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

Conflicts:
src/server/server.c

13 years agoCommitting local changes
John Hodge [Sun, 20 Feb 2011 01:45:40 +0000 (09:45 +0800)]
Committing local changes

13 years agoImplemented `dispense <item>`
John Hodge [Sun, 20 Feb 2011 01:42:20 +0000 (09:42 +0800)]
Implemented `dispense <item>`

- Also cleaned up some bugs in the server

13 years agoMerge branch 'master' of serenade.mutabah.net:opendispense2
John Hodge [Sat, 19 Feb 2011 13:37:26 +0000 (21:37 +0800)]
Merge branch 'master' of serenade.mutabah.net:opendispense2

13 years agoCleaning up
John Hodge [Sat, 19 Feb 2011 13:32:09 +0000 (21:32 +0800)]
Cleaning up

- Fixed autoauth
- Removed debug manual auth hack
- Fixed server argument parsing
- Disabled negative

13 years agoDoor handling fixed (for now)
John Hodge [Sat, 19 Feb 2011 11:12:53 +0000 (19:12 +0800)]
Door handling fixed (for now)

13 years agoMade llogin use a pty instead of a pipe pair
John Hodge [Sat, 19 Feb 2011 10:23:34 +0000 (18:23 +0800)]
Made llogin use a pty instead of a pipe pair

13 years agoFixed bug with llogin args
John Hodge [Sat, 19 Feb 2011 10:03:36 +0000 (18:03 +0800)]
Fixed bug with llogin args

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 09:48:54 +0000 (17:48 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoWaiting for llogin?
John Hodge [Sat, 19 Feb 2011 09:48:25 +0000 (17:48 +0800)]
Waiting for llogin?

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 09:26:24 +0000 (17:26 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoDebugging stdout from child
John Hodge [Sat, 19 Feb 2011 09:26:06 +0000 (17:26 +0800)]
Debugging stdout from child

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 09:23:40 +0000 (17:23 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoLess crashy, hopefully more worky
John Hodge [Sat, 19 Feb 2011 09:21:48 +0000 (17:21 +0800)]
Less crashy, hopefully more worky

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 09:06:51 +0000 (17:06 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoLet's try this again...
John Hodge [Sat, 19 Feb 2011 09:06:07 +0000 (17:06 +0800)]
Let's try this again...

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 09:02:42 +0000 (17:02 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoBetter door logging
John Hodge [Sat, 19 Feb 2011 09:02:26 +0000 (17:02 +0800)]
Better door logging

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 08:51:54 +0000 (16:51 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoFixed usage or execl
John Hodge [Sat, 19 Feb 2011 08:51:38 +0000 (16:51 +0800)]
Fixed usage or execl

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 08:48:59 +0000 (16:48 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoLess crashy in door handler
John Hodge [Sat, 19 Feb 2011 08:48:44 +0000 (16:48 +0800)]
Less crashy in door handler

13 years agoMerge branch 'master' of git://mutabah.net/opendispense2
John Hodge [Sat, 19 Feb 2011 08:09:02 +0000 (16:09 +0800)]
Merge branch 'master' of git://mutabah.net/opendispense2

13 years agoDebugging fixes to cokebank
John Hodge [Sat, 19 Feb 2011 08:08:51 +0000 (16:08 +0800)]
Debugging fixes to cokebank

13 years agoDoor config settings (and some fixes to doorgroup reporting)
John Hodge [Sat, 19 Feb 2011 08:07:50 +0000 (16:07 +0800)]
Door config settings (and some fixes to doorgroup reporting)

13 years agoDebugging door
John Hodge [Sat, 19 Feb 2011 07:30:31 +0000 (15:30 +0800)]
Debugging door

13 years agoMultiple chanegs, see details
John Hodge [Sat, 19 Feb 2011 07:17:41 +0000 (15:17 +0800)]
Multiple chanegs, see details

- Added option to hide an item from ENUM_ITEMS (prefix with '-')
- Added door server password support (command line)
- Non-enabled inotify support for item config

13 years agoHacked to stop root dispenses
John Hodge [Sat, 19 Feb 2011 06:27:42 +0000 (14:27 +0800)]
Hacked to stop root dispenses

13 years agoChanged client not to keep a persistent connection when choosing items
John Hodge [Sat, 19 Feb 2011 06:15:54 +0000 (14:15 +0800)]
Changed client not to keep a persistent connection when choosing items

13 years agoUser timeouts, compile fixes
John Hodge [Sat, 19 Feb 2011 06:12:27 +0000 (14:12 +0800)]
User timeouts, compile fixes

13 years agoCleaning and fixing coke handler
John Hodge [Sat, 19 Feb 2011 05:18:18 +0000 (13:18 +0800)]
Cleaning and fixing coke handler

- Send 'd7' before checking status

13 years agoReset slot names on startup
John Hodge [Sat, 19 Feb 2011 04:56:06 +0000 (12:56 +0800)]
Reset slot names on startup

13 years agoFixing crappy code in coke handler, debug in others
root [Sat, 19 Feb 2011 04:16:28 +0000 (12:16 +0800)]
Fixing crappy code in coke handler, debug in others

13 years agoFixed debug in cokebank
John Hodge [Sat, 19 Feb 2011 03:31:35 +0000 (11:31 +0800)]
Fixed debug in cokebank

13 years agoDebugging sqlite cokebank, slight fixes to coke handler
John Hodge [Sat, 19 Feb 2011 03:25:12 +0000 (11:25 +0800)]
Debugging sqlite cokebank, slight fixes to coke handler

13 years agoFuck the timestamp
John Hodge [Sat, 19 Feb 2011 03:13:30 +0000 (11:13 +0800)]
Fuck the timestamp

13 years agoFixed timestamp
John Hodge [Sat, 19 Feb 2011 03:12:54 +0000 (11:12 +0800)]
Fixed timestamp

13 years ago*bleep* Compile before commit
John Hodge [Sat, 19 Feb 2011 03:11:56 +0000 (11:11 +0800)]
*bleep* Compile before commit

13 years agoDebugging fixes
John Hodge [Sat, 19 Feb 2011 03:11:00 +0000 (11:11 +0800)]
Debugging fixes

13 years agoFxied autoauth
John Hodge [Sat, 19 Feb 2011 02:50:44 +0000 (10:50 +0800)]
Fxied autoauth

13 years agoFixed admins not being coke members
John Hodge [Sat, 19 Feb 2011 02:45:38 +0000 (10:45 +0800)]
Fixed admins not being coke members

13 years agoImplemented `dispense acct <name> =`
John Hodge [Sat, 5 Feb 2011 09:33:53 +0000 (17:33 +0800)]
Implemented `dispense acct <name> =`

- also starting on moving item database to cokebank

13 years agoFixes to bugs pointed by [BOB]
John Hodge [Wed, 2 Feb 2011 13:24:15 +0000 (21:24 +0800)]
Fixes to bugs pointed by [BOB]

- Error in SQL code (assumed time_t was 64-bits)
- Lack of `dispense acct =` (still needs client support)
- Bumped the coke read timeout down
- Made balance alter happen after the dispense

13 years agoUntested fix to coke code (flushes buffer beofre reading)
John Hodge [Wed, 2 Feb 2011 03:48:45 +0000 (11:48 +0800)]
Untested fix to coke code (flushes buffer beofre reading)

- Changed dispense logic to only do a transfer on a non-zero price

13 years agoSQLite database works, time for more thorough stress testing
John Hodge [Sun, 30 Jan 2011 15:14:45 +0000 (23:14 +0800)]
SQLite database works, time for more thorough stress testing

- Added database setup script to aid initial setup
 > Creates an account as the current user and gives them $10

13 years agoSQLite cokebank feature complete, bugfix time
John Hodge [Sun, 30 Jan 2011 10:55:58 +0000 (18:55 +0800)]
SQLite cokebank feature complete, bugfix time

13 years agoSQLite CokeBank compiles
John Hodge [Sun, 30 Jan 2011 08:49:14 +0000 (16:49 +0800)]
SQLite CokeBank compiles

13 years agoRemoving explicit mentions to users in the cokebank
John Hodge [Sun, 30 Jan 2011 06:59:17 +0000 (14:59 +0800)]
Removing explicit mentions to users in the cokebank

- Also did more work on the SQLite implementation
- Updated terminology in schema
 > Changed the wheel flag to a more general administrator flag

13 years agoBig cleanups, reworked CokeBank API
John Hodge [Sun, 30 Jan 2011 06:27:04 +0000 (14:27 +0800)]
Big cleanups, reworked CokeBank API

- Cokebank API (hopefully) finalised
- SQLite Cokebank implementation started
- Fixed some bugs in the server
 > Coke code didn't check if the machine handle was open
 > Segfault in ENUM_ITEMS

13 years agoFiddling with potential database schema
John Hodge [Sat, 29 Jan 2011 04:27:21 +0000 (12:27 +0800)]
Fiddling with potential database schema

13 years agoCleaned up cokebank_basic a bit
John Hodge [Sun, 16 Jan 2011 09:04:52 +0000 (17:04 +0800)]
Cleaned up cokebank_basic a bit

- Working on possible new database format

13 years agoAdded database structure, moved planning to notes/
John Hodge [Sun, 16 Jan 2011 09:04:14 +0000 (17:04 +0800)]
Added database structure, moved planning to notes/

13 years agoCleanup - Multiple changes, see description
John Hodge [Sat, 8 Jan 2011 09:08:33 +0000 (17:08 +0800)]
Cleanup - Multiple changes, see description

- Enabled -Wextra and -Werror
- Added Bank_ prefix to cokebank exports
- Merged cokebank into one file, cleaned up duplication of functions
  and direct abstractions.
- Added doorgroup checking to the door handler.

13 years agoAbstraced updates to the cokebank file to a function
John Hodge [Sat, 8 Jan 2011 08:29:02 +0000 (16:29 +0800)]
Abstraced updates to the cokebank file to a function

13 years agoSlight change to cokebank logging
John Hodge [Sat, 8 Jan 2011 03:20:50 +0000 (11:20 +0800)]
Slight change to cokebank logging

13 years agoChanged user type from an enum to a collection of flags
John Hodge [Fri, 7 Jan 2011 09:43:44 +0000 (17:43 +0800)]
Changed user type from an enum to a collection of flags

- Fixed negative cents glitch in `dispense acct`

13 years agoAssumed the format of an item ID in the client
John Hodge [Fri, 7 Jan 2011 09:07:17 +0000 (17:07 +0800)]
Assumed the format of an item ID in the client

- This in preparation for adapting the client to categorise the items
  in the ncurses GUI.

13 years agoFixed syntax error in snack handler
John Hodge [Fri, 7 Jan 2011 08:34:22 +0000 (16:34 +0800)]
Fixed syntax error in snack handler

13 years agoCompleted removing SET, implemented GIVE
John Hodge [Fri, 7 Jan 2011 08:27:45 +0000 (16:27 +0800)]
Completed removing SET, implemented GIVE

13 years agoDocumentation cleanups
John Hodge [Fri, 7 Jan 2011 07:59:06 +0000 (15:59 +0800)]
Documentation cleanups

- Added doxygen comments to cokebank.h

13 years agoRemoved references to LDAP when USE_LDAP is undefined
John Hodge [Fri, 7 Jan 2011 07:43:00 +0000 (15:43 +0800)]
Removed references to LDAP when USE_LDAP is undefined

13 years agoMoved GetUserAuth out to Cokebank (removes potential duplication)
John Hodge [Fri, 7 Jan 2011 07:33:09 +0000 (15:33 +0800)]
Moved GetUserAuth out to Cokebank (removes potential duplication)

- Also did some cleanup changes (placed TODOs)
- Removed `dispense acct <name> =<value>` because it will mess up the
  accounting logs.

13 years agoActually implemented `dispense -u`
John Hodge [Fri, 7 Jan 2011 07:16:57 +0000 (15:16 +0800)]
Actually implemented `dispense -u`

- Only the backend was implemented before

13 years agoWorking on LDAP Authentication, added `dispense -u` support
John Hodge [Fri, 7 Jan 2011 07:07:58 +0000 (15:07 +0800)]
Working on LDAP Authentication, added `dispense -u` support

13 years agoMoved to syslog for the dispense log
John Hodge [Fri, 7 Jan 2011 03:57:27 +0000 (11:57 +0800)]
Moved to syslog for the dispense log

- Commenting changes

13 years agoUpdated ShowUsage for the new commands
John Hodge [Fri, 7 Jan 2011 03:33:53 +0000 (11:33 +0800)]
Updated ShowUsage for the new commands

13 years agoImplemented altering user flags
John Hodge [Fri, 7 Jan 2011 03:20:52 +0000 (11:20 +0800)]
Implemented altering user flags

- `dispense user type` added to set flags

13 years agoAdded new user command (wheel only)
John Hodge [Fri, 7 Jan 2011 01:54:05 +0000 (09:54 +0800)]
Added new user command (wheel only)

13 years agoImplemented limits on `dispense acct` and in ENUM_USERS
John Hodge [Thu, 6 Jan 2011 06:07:32 +0000 (14:07 +0800)]
Implemented limits on `dispense acct` and in ENUM_USERS

13 years agoChanged ENUM_ITEMS to the ENUM_USERS format
John Hodge [Thu, 6 Jan 2011 05:47:14 +0000 (13:47 +0800)]
Changed ENUM_ITEMS to the ENUM_USERS format

- Much cleaner client and server code now :)

13 years agoCokebank now checks users' groups when getting flags
John Hodge [Thu, 6 Jan 2011 05:41:28 +0000 (13:41 +0800)]
Cokebank now checks users' groups when getting flags

- Checks if the user is in the 'coke' or 'wheel' groups, and if they
  are, sets the flags accordingly.

13 years agoAdded coke group check to ADD
John Hodge [Thu, 6 Jan 2011 05:25:30 +0000 (13:25 +0800)]
Added coke group check to ADD

- Also fixed a place where a newline was not sent to the client
- Added a "door" flag

13 years agoAdded user flags, disable server trace
John Hodge [Thu, 6 Jan 2011 05:19:09 +0000 (13:19 +0800)]
Added user flags, disable server trace

- Added support for user flags to USER_INFO
 > TODO: Check for coke or higher when doing a privalaged operation
- Unified ENUM_USERS and USER_INFO's output function

13 years agoRemoved heap abuse from server (now uses sendf)
John Hodge [Thu, 6 Jan 2011 05:06:51 +0000 (13:06 +0800)]
Removed heap abuse from server (now uses sendf)

- Added cokebank.h
- Fixed namespace on user flags

13 years agoCOPYING and README
John Hodge [Thu, 6 Jan 2011 04:43:31 +0000 (12:43 +0800)]
COPYING and README

- A little threadbare for now.
 > Anyone else want to work on the readme?

13 years agoUser enumeration implemented
John Hodge [Thu, 6 Jan 2011 04:25:45 +0000 (12:25 +0800)]
User enumeration implemented

- TODO: Implement <min balance> and <max balance>
- Updated protocol spec for extended ENUM_USERS
- Client Dispense_EnumUsers implemented
 > Changed padding in Dispense_ShowUser
- Fixed client's ReadLine
 > Was not using the remaining data in the buffer
- Created a common "cokebank.h" for server
 > Moved pseudo-account names into this file
- Implemented ENUM_USERS at server side
 > Copied sendf to the server to improve response times (and memory
   usage)

13 years agoUpdated protocol def
John Hodge [Thu, 6 Jan 2011 03:40:22 +0000 (11:40 +0800)]
Updated protocol def

- Changed ENUM_USERS to return a list of USER_INFO responses.
- Adding stub support for reading user flags from cokebank (TODO:
  standardise the flag values)
 > Also TODO: Common header for the cokebank (shared between it and the
   server)

13 years agoRemoved debug from server, cleaning client
John Hodge [Thu, 6 Jan 2011 03:08:53 +0000 (11:08 +0800)]
Removed debug from server, cleaning client

- Removed the last use of 'recv' from the client code.
- Added a catch to the cokebank code for the username 'root'

13 years agoCleanup and Implementations
John Hodge [Thu, 6 Jan 2011 03:00:25 +0000 (11:00 +0800)]
Cleanup and Implementations

- Implemented `dispense acct <user>`
- Partitally implemented `dispense acct <user> +-<amt> <reason>`
 > Seems to not like the '>liability' pseudo account (not letting it
   go negative)
- Cleaned up more of the client code, and added debugging to it

13 years agoFiddling with protocol (might redesign it a bit)
John Hodge [Thu, 6 Jan 2011 00:05:55 +0000 (08:05 +0800)]
Fiddling with protocol (might redesign it a bit)

13 years agoImplemented `dispense add` in server
John Hodge [Wed, 5 Jan 2011 08:49:39 +0000 (16:49 +0800)]
Implemented `dispense add` in server

13 years agoMore cleanup, implementing `dispense give`
John Hodge [Wed, 5 Jan 2011 08:36:17 +0000 (16:36 +0800)]
More cleanup, implementing `dispense give`

UCC git Repository :: git.ucc.asn.au