Whoop.. I'm a dork.  I miscounted columns, and assumed the SELECT in
vmysql.c just grabbed them all.

It's working now :)   (But if anyone is interested in more, or has any
ideas on a better way to do it, let me know)

Rick

On Mon, 2003-03-03 at 09:48, Rick Romero wrote:
> This is a first attempt at adding user-based "Service Levels" to my
> setup in vpopmail.  I run vpopmail with MySQL, and so far I'm just
> trying to change what html templates are displayed by qmailadmin. 
> (basically, the same thing that's done for postmaster and quotas)
> 
> I've attached two patches to vpopmail-5.3.18 and qmailadmin-1.12, and I
> was hoping someone could help me :)
> 
> It seems the default 'svclvl' of 0 is always used, and I'm not sure if
> it's not pulled from MySQL, or if I've just done something wrong
> somewhere else.  
> 
> A couple things to note:
> 1. I'm not a programmer :)  (What my look like good works from me, are
> just modifications of other's works ;)
> 2. I think it's best if I change that char's to int's, but I started
> with char because I added the field in MySQL as a char.  I haven't
> gotten back to that part yet, afaics, it should work as is.
> 
> I'm not sure about:
>          if ( row[8] != 0) strncpy(vpw.pw_svclvl, row[8],SMALL_BUFF);
> in vmysql.c, row[8] should exist because I do have a clear password
> (row[7]).
> 
> 
> I haven't even thrown any basic printf's in there for debugging, so I am
> REALLY at the beginning of trying to make this work.. (umm, where would
> they end up?  syslog?)
> 
> So before I really start spending time on it, is anyone else interested
> is this, and if so.. is there a better, more 'global' way of doing this?
> I'm not very comfortable with assigning 'Service Levels' directly in the
> qmailadmin code, but for my own uses it'll work just fine.
> 
> And if anyone could comment on the patches, and what I did wrong, I'd
> appreciate it :)
> 
> I'm not on the qmailadmin list, so I didn't send this there.. I want to
> make sure my vpopmail code looks right first :)
> 
> Thanks
> 
> Rick


Reply via email to